Skip to content

Conversation

Lucas0T
Copy link
Collaborator

@Lucas0T Lucas0T commented Aug 27, 2025

No description provided.

@Lucas0T Lucas0T linked an issue Aug 27, 2025 that may be closed by this pull request
@Lucas0T Lucas0T force-pushed the 451-move-validation-before-the-pipeline branch from 06a1613 to 63166aa Compare August 27, 2025 09:34
Copy link

codecov bot commented Aug 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.37%. Comparing base (bb63cbe) to head (65a7165).

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #462      +/-   ##
============================================
+ Coverage     85.12%   85.37%   +0.25%     
- Complexity      919      920       +1     
============================================
  Files            93       93              
  Lines          2789     2790       +1     
  Branches        292      292              
============================================
+ Hits           2374     2382       +8     
+ Misses          288      284       -4     
+ Partials        127      124       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Lucas0T Lucas0T marked this pull request as draft August 27, 2025 14:12
@Lucas0T Lucas0T marked this pull request as ready for review September 2, 2025 11:51
response.expectStatus().isBadRequest().expectHeader().contentType("application/fhir+json")
.expectBody()
.jsonPath("$.resourceType").isEqualTo("OperationOutcome")
.jsonPath("$.issue[0].diagnostics").isEqualTo("IllegalArgumentException: Invalid CRTDL");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diagnostics should not contain any Java related artefacts like class names. So I would just remove IllegalArgumentException. "Invalid CRDTL" is good enough.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok then i change the whole generation

import static org.assertj.core.api.Assertions.assertThat;

class ResultFileManagerTest {
final String RESULTS_DIR = "ResultFileManagerDir";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

static final


resultFileManager.saveErrorToJson(jobId, operationOutcome, HTTP_OK).block();

assertThat(readJobErrorFile(jobId)).isEqualTo(fhirParser.encodeResourceToString(operationOutcome));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new parser has to be created for each parsing call.

Assertions.fail("HTTP request failed with status code: " + e.getStatusCode());
}

} catch (IOException e) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please just throw exceptions from the test method. logging will not fail the test

@Lucas0T Lucas0T force-pushed the 451-move-validation-before-the-pipeline branch from 0949e5e to f649ec0 Compare September 2, 2025 12:46
@Lucas0T Lucas0T force-pushed the 451-move-validation-before-the-pipeline branch from f649ec0 to 65a7165 Compare September 2, 2025 12:47
Copy link
Collaborator

@juliangruendner juliangruendner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the validate function name of the CrtdlValidatorService to
validateAndAnnotate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move Validation before the Pipeline
3 participants